$(function(){
	//删除
	$('.delete-list').on('click',function(){
		popup(this,"{:url('delete')}");
		
	});
	//启用
	$('.startusing').on('click',function(){
		popup(this,"{:url('state')}");
		
	});
	//禁用
	$('.forbidden').on('click',function(){
		popup(this,"{:url('state')}");
		
	});
	//全选
	$('.check-all').on('click',function(){
		checkall(this)
	});
	$('.check-list').on('click',function(){
		checkall(this)
	});
	//删除多个
	$(".delete-multiple").on('click',function(){
		popup(this,"{:url('delete')}");
	})
	$('.choose').on('click', function() {
		var index = parent.layer.getFrameIndex(window.name); 
		parent.$('.car_type').attr("value",$(this).data('type')+"·"+$(this).data('cartype'));
		parent.$('.car_type_id').attr("value",$(this).data('id'));
		parent.layer.close(index);
	});
})
